<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class video extends CI_Controller {
    private $page;
    public function __construct() {
        parent::__construct();
        $user_data = $this->session->all_userdata();
        if (isset($user_data["logged_in"]) && $user_data["logged_in"] == TRUE) {
            $this->page["header"] = $this->load->view("part/header_login", '', true);
        } else {
            $this->page["header"] = $this->load->view("part/header_no_login", '', true);
        }
    }
    /**
     * Action   :index
     * Purpose  :Return to home page (Home/index)
     * liet ke truong
     * Date     :
     * Author   :pham truong
     */
    public function index($id_video) {
        $page = $this->page;
        //ID cua ban video
        
        $this->load->model("video_model");
        // get heading from article with ID = $id_video
        $data['video'] = $this->video_model->video($id_video);
        

        $page['content'] = $this->load->view("page/video/index",$data, true);
        $this->load->view("layout", $page);
    }

    /**
     * Action   :view
     * Purpose  :View content (article, video, link)
     * Unexpected:
     * 1. Nhập
     * Date     :
     * Author   :
     */
    public function view() {
        
    }

}

/* End of file content.php */
/* Location: ./application/controllers/content.php */